package com.example.springbootapplication.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.Ordered;

/**
 * @Author acy
 * @Date 2019/04/27
 */
public class AfterHelloWorldApplicationListener implements ApplicationListener<ContextRefreshedEvent>, Ordered {
	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		System.out.println("after hello world 自定义监听"+event.getApplicationContext().getId()+"时间---"+event.getTimestamp());

	}

	@Override
	public int getOrder() {
		return Ordered.LOWEST_PRECEDENCE;
	}
}
